package cn.datastruct.four;

public class TestDoubleLinkedList {
    public static void main(String[] args) {
        DoubleLinkedNode dln1 = new DoubleLinkedNode(19, "张小二", "324x");
        DoubleLinkedNode dln2= new DoubleLinkedNode(20, "王麻子", "234s");
        DoubleLinkedNode dln3 = new DoubleLinkedNode(21, "李华", "342s");
        DoubleLinkedNode dln4 = new DoubleLinkedNode(17, "张三", "324t");
        DoubleLinkedNode dln5 = new DoubleLinkedNode(19, "宋磊", "456y");
        DoubleLinkedNode dln6 = new DoubleLinkedNode(20, "叶枫", "718s");

        DoubleLinkedList dll = new DoubleLinkedList();

        dll.insert(dln1);
        dll.insert(dln2);
        dll.insert(dln3);
        dll.insert(dln4);
        dll.insert(dln5);
        dll.insert(dln6);
        dll.del();
        dll.del();
        dll.del();
        dll.del();
        dll.insertByIndex(dln3, 1);
        dll.insertByIndex(dln4, 3);
        dll.insertByIndex(dln5, 2);
        dll.delByIndex(2);
        dll.delByIndex(2);
        dll.showDoubleLinkedList();
    }

}
